package com.atguigu.eduservice.demo;

import com.atguigu.eduservice.EduApplication;
import com.atguigu.eduservice.entity.EduSubject;
import com.atguigu.eduservice.entity.subject.OneSubject;
import org.springframework.beans.BeanUtils;

import java.util.Date;

public class BeanUtilsTest01 {
    public static void main(String[] args) {
        OneSubject oneSubject = new OneSubject();
        EduSubject eduSubject = new EduSubject("1","2","2",2,new Date(),new Date());

        BeanUtils.copyProperties(eduSubject,oneSubject,"id");
        System.out.println(eduSubject);
        System.out.println(oneSubject);
    }
}
